//
//  SetAboutViewCell.swift
//  UNHimalayas
//
//  Created by 王水平 on 2019/11/26.
//  Copyright © 2019 HachiTech. All rights reserved.
//

import UIKit

class SetAboutViewCell: UITableViewCell {

    var titleLabel : UILabel!
    var contentLabel : UILabel!
    var arrowsImgView : UIImageView!
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        initTitleLabel()
        initContentLabel()
        initArrowsImageView()
    }
    
    func initTitleLabel() -> Void {
        
        titleLabel = UILabel()
        titleLabel.backgroundColor = UIColor.clear
        titleLabel.text = "label"
        titleLabel.textColor = UIColor.black
        titleLabel.textAlignment = .left
        titleLabel.font = UIFont.systemFont(ofSize: 16)
        self.contentView.addSubview(titleLabel)
        
        titleLabel.snp.makeConstraints { (make) in
            
            make.centerY.right.equalToSuperview()
            make.left.equalToSuperview().offset(kRealWidth(15))
            make.height.equalTo(kRealWidth(20))
        }
    }
    
    func initContentLabel() -> Void {
        
        contentLabel = UILabel()
        contentLabel.backgroundColor = UIColor.clear
        contentLabel.text = ""
        contentLabel.textColor = UIColor.lightGray
        contentLabel.textAlignment = .right
        contentLabel.font = UIFont.systemFont(ofSize: 14)
        self.contentView.addSubview(contentLabel)
        
        contentLabel.snp.makeConstraints { (make) in
            
            make.centerY.equalToSuperview()
            make.right.equalToSuperview().offset(kRealWidth(-15))
            make.width.equalTo(kRealWidth(150))
            make.height.equalTo(kRealWidth(20))
        }
    }
    
    func initArrowsImageView() -> Void {
        
        arrowsImgView = UIImageView()
        arrowsImgView.backgroundColor = .clear
        arrowsImgView.image = UIImage(named: "reward_right")
        self.contentView.addSubview(arrowsImgView)
        
        arrowsImgView.snp.makeConstraints { (make) in
            
            make.centerY.equalToSuperview()
            make.right.equalToSuperview().offset(kRealWidth(-15))
            make.width.equalTo(kRealWidth(7))
            make.height.equalTo(kRealWidth(10))
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
